<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        /* 
        ...(展开运算符)
            -可以将一个数组中的元素展开到另一个数组中,或者作为函数的参数传递
            -通过他也可以进行浅复制
        */
        const arr = [{ name: '111' }, { name: 'ggg' }];
        const arr3 =[...arr]
        const arr4 =[1,2,3]
        function sum(a,b,c) {
            return a+b+c            
        }
        result = sum(...arr4)
        console.log(result);
        const obj = {name:"GG",age:11}
        const obj2 = Object.assign({},obj)
        const obj3 = {address:"则",...obj,age:11}
        console.log(obj3);
    </script>
</head>
<body>
    
</body>
</html>